﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CorporateGym.DAL;

namespace BLL.Entities
{
    public class Payment
    {
        public int TraineeId { get; set; }
        public int Month { get; set; }
        public int Year { get; set; }

        public override string ToString()
        {
            string result = string.Format ("{0}/{1}", Month, Year);
            return result;
        }

        public static Payment CreateFromRow(CorporateGymDB.PaymentsRow i_Row)
        {
            return new Payment
            {
                TraineeId = i_Row.TraineeId,
                Month = i_Row.Month,
                Year = i_Row.Year
            };
        }
    }
}
